<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 需求：创建一个对象，该对象存储一个学生的信息，该对象包含学号、身份证、年龄、性别、所学专业等属性信息，
    // 同时该对象包含一个自我介绍的方法，用来输出该对象的所有信息

    //1：创建一个对象 obj
    let obj = {
      //2：给对象存储一个学生的信息!
      name: "张三",
      age: 12,
      ID: "44156729981123",
      studentID: "16010888",
      sex: "男",
      specialty: "划水啊，专业划水的！",
      selfIntroduction: function () {
        console.log("我是名字是：" + this.name + "," + "我的年龄为：" + this.age + "," + "我的身份证为：" + this.ID + "," + "我的学号是：" +
          this
          .studentID + "," +
          "我的性别为：" + this.sex + "," + "我的专业是：" + this.specialty);
      }
    }
    obj.selfIntroduction();
  </script>
</body>

</html>